#pragma once
#include"Events/ApplicationEvent.h"
#include"myMiniEngine/Core.h"
#include"Events/Event.h"
#include<vector>
#include<memory>
//#include"Platform/Windows/WindowsWindow.h"
#include"Window.h"

#include"LayerStack.h"
//#include"myMiniEngine/ImGui/ImGuiLayer.h"
#include "myMiniEngine/Events/Event.h"
#include "myMiniEngine/Events/ApplicationEvent.h"
#include"myMiniEngine/ImGui/ImGuiLayer.h"
#include"myMiniEngine/Core/Timestep.h"

//#include"myMiniEngine/Renderer/Shader.h"
//#include"myMiniEngine/Renderer/Buffer.h"
//#include"myMiniEngine/Renderer/VertexArray.h"
//
//#include"myMiniEngine/Renderer/OrthographicCamera.h"

namespace myMiniEngine {
	class Application
	{
	public:

		Application();

		virtual ~Application();

		void Run();
		void OnEvent(Event& e);

		void PushLayer(Layer* _layer);
		void PushOverlay(Layer* _layer);
		
		inline Window& GetWindow() { return *window; }

		inline static Application& Get() { return *instance; }
		
	private:
		bool OnWindowClose(WindowCloseEvent& e);

		std::unique_ptr<Window> window;
		ImGuiLayer* m_ImGuiLayer;
		bool m_Running=true;
		LayerStack layerStack;
		float lastFrameTime = 0.0f;

		
		

		static Application* instance;
		
	};
	//On client
	Application* CreateApplication();

}


